package com.elecbook.media.api.service.data;


import com.elecbook.media.model.po.UploadFile;
import com.elecbook.media.model.po.UploadImage;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

public interface MongoDbService {
    UploadFile uploadFile(UploadFile uploadFile);

    /**
     * description 将MultipartFile文件转换为mongoDB支持的实体
     *
     * @author zken
     * @CreateDate 2024/11/16 19:33:48
     */
    UploadFile getUploadFileEntity(MultipartFile file) throws IOException;

    /**
     * description 将MultipartFile文件转换为mongoDB支持的实体
     *
     * @author zken
     * @CreateDate 2024/11/16 19:33:48
     */
    UploadImage getUploadImageEntity(MultipartFile file) throws IOException;

    /**
     * 上传文件
     * @param uploadImage
     * @return
     */
    UploadImage uploadImage(UploadImage uploadImage);
}
